<template>
  <div v-if="gateWayInfos && gateWayInfos.length>0">
    <div class="status" v-for="(item,index) in gateWayInfos" :key="index"> 
      <StatusControl :gateWayInfo="item"></StatusControl>
    </div>
      
  </div>
</template>

<script>
import { getAllGateWayInfo } from "@/api/gateway/basicinfo";
import StatusControl from './components/StatusControl'   // 加载子组件
export default {
// name: 'Dashboard',
  components: {
    StatusControl
  },
 data() {
    return {
      gateWayInfos: [],
    };
  },
  mounted() {
    this.LoadGateWayStatus();
  },
  methods: {
    //
    LoadGateWayStatus() {
      getAllGateWayInfo({
      }).then((response) => {   
          this.gateWayInfos = response.data;
          console.log(this.gateWayInfos)
        }).catch((ex) => {console.log(ex)});
    },
  }
}
</script>

<style rel="stylesheet/scss" lang="scss">
  .status {
    width: 400px;
    display: inline-block;
    margin-left: 10px;
    margin-top: 10px
  }
</style>